<!DOCTYPE html>
<html lang='en'>
<head>
    <meta charset='UTF-8'>
    <meta name='viewport' content='width=device-width, initial-scale=1.0'>
    <title>Document</title>
    <script type='text/javascript' src='js/vue.js'></script>
</head>
<body>
    <div id='app'>
        <!-- $event当实参传入函数，打印的是和原生js中的e类似 -->
        <div @click="bb($event)">
            <a href="www.baidu.com" @click.prevent.stop="aa">{{msg}}</a>
        </div>
    </div>
    <script type='text/javascript'>
        var vm = new Vue({
            el: '#app',
            data: {
                msg: '点击打开新世界的大门',
                
            },
            methods: {
                aa() {
                    console.log('这时子元素，且阻止了默认跳转'); 
                },
                bb(b) {
                    console.log('我是父元素',b);
                }
            }
        });
    </script>
</body>
</html>